#define   _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void main() {

	int s = 0, i = 1, j = 0, x = 1, y = 1;

	for (i = 1; i <= 9; i++)
	{
		for (j = 1; j <= i; j++)
		{
			x = x * i;
		}
		s = s + x;
		x = y;
	}
	printf("sum=%d\n",s);
}